from django.utils.translation import gettext_lazy as _
from django.db import models


class UserType(models.IntegerChoices):
    """
    用户身份
    """
    NORMAL_USER = 1, _("普通用户")
    VIP_USER = 2, _("会员用户")


class AgentType(models.IntegerChoices):
    ORDINARY_AGENT = 1, _("普通代理")
    REGIONAL_AGENT = 2, _("区域代理")
    PROVINCIAL_AGENT = 3, _("省级代理")


class AgentOperationType(models.IntegerChoices):
    WECHAT = 1, _("微信")
    AGENT_OP = 2, _("代理商指定")  # 代理商指定
    BACKGROUND_ADD = 3, _("后台添加")  # 后台添加


class WaterCardType(models.IntegerChoices):
    GET = 1, _("领取")
    CONSUME = 2, _("消费")


# 装水容器
class CONTAINER(models.IntegerChoices):
    BUCKET = 1, _("桶")
    BOTTLE = 2, _("瓶")


class TransactionStatus(models.IntegerChoices):
    PENDING_PAYMENT = 1, _("待付款")
    CANCELED_PAYMENT = 2, _("已取消")
    COMPLETED_PAYMENT = 3, _("已完成")


# 订单状态
class DeliveryStatus(models.IntegerChoices):
    TO_BE_SHIPPED = 1, _("待发货")  # 待发货
    SHIPPING = 2, _("发货中")  # 发货中
    SHIP_COMPLETED = 3, _("已发货")  # 已完成
    AWAITING_PICKUP = 4, _("待取货")


class AfterSalesStatus(models.IntegerChoices):
    NO_REFUND = 0, _("未申请售后")  # 退款中
    REFUND_IN_PROGRESS = 1, _("退款中")  # 退款中
    REFUNDED = 2, _("已退款")  # 已退款
    REFUND_FAILED = 3, _("退款失败")  # 退款失败
    REFUND_REJECTED = 4, _("退款被拒绝")  # 退款被拒绝


class PayType(models.IntegerChoices):
    WECHAT = 1, _("微信")
    WATER_CARD = 2, _("水卡")


class GoodStatus(models.IntegerChoices):
    SALE = 1, _("在售")
    UN_SALE = 2, _("下架")


class Gender(models.IntegerChoices):
    MALE = 1, _("男")
    FEMALE = 2, _("女")
    UNKNOWN = 0, _("未知")


class Whether(models.IntegerChoices):
    YES = 1, _("是")
    NO = 0, _("否")


class Channel(models.IntegerChoices):
    AGENT_SET = 1, _("代理商设置")
    BUY = 2, _("购买")
    CONNECT_COMPANY = 3, _("对接公司")


class IndexAdType(models.IntegerChoices):
    APPLETS_INDEX_AD = 1, _("小程序首页广告")
    APPLETS_EQUITY_AD = 2, _("小程序收益广告")
    AGENT_INDEX_AD = 3, _("代理商首页广告")
    AGENT_PACKAGE_AD = 4, _("代理商套餐广告")


class HttpMethod(models.IntegerChoices):
    GET = 0, _("GET")
    POST = 1, _("POST")
    DELETE = 2, _("DELETE")
    PUT = 3, _("PUT")
    PATCH = 4, _("PATCH")


class PermissionGroupType(models.IntegerChoices):
    NORMAL = 0, _("普通用户")
    SUPER = 1, _("超级用户")


class AreaType(models.IntegerChoices):
    PROVINCE = 0, _("省/自治区/直辖市")
    CITY = 1, _("市级地区")
    COUNTY = 2, _("县级地区")
